package AlarmIRPSystem;


/**
 * Generated from IDL interface "AlarmIRP".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public abstract class AlarmIRPPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, AlarmIRPSystem.AlarmIRPOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "get_alarm_irp_operations_profile", new java.lang.Integer(0));
		m_opsHash.put ( "comment_alarms", new java.lang.Integer(1));
		m_opsHash.put ( "get_alarm_irp_versions", new java.lang.Integer(2));
		m_opsHash.put ( "get_alarm_irp_notification_profile", new java.lang.Integer(3));
		m_opsHash.put ( "get_alarm_list", new java.lang.Integer(4));
		m_opsHash.put ( "clear_alarms", new java.lang.Integer(5));
		m_opsHash.put ( "get_alarm_count", new java.lang.Integer(6));
		m_opsHash.put ( "unacknowledge_alarms", new java.lang.Integer(7));
		m_opsHash.put ( "acknowledge_alarms", new java.lang.Integer(8));
	}
	private String[] ids = {"IDL:AlarmIRPSystem/AlarmIRP:1.0"};
	public AlarmIRPSystem.AlarmIRP _this()
	{
		return AlarmIRPSystem.AlarmIRPHelper.narrow(_this_object());
	}
	public AlarmIRPSystem.AlarmIRP _this(org.omg.CORBA.ORB orb)
	{
		return AlarmIRPSystem.AlarmIRPHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // get_alarm_irp_operations_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_alarm_irp_operations_profile(_arg0));
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(AlarmIRPSystem.GetAlarmIRPOperationsProfile _ex2)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.GetAlarmIRPOperationsProfileHelper.write(_out, _ex2);
			}
				break;
			}
			case 1: // comment_alarms
			{
			try
			{
				java.lang.String[] _arg0=AlarmIRPConstDefs.AlarmInformationIdSeqHelper.read(_input);
				java.lang.String _arg1=_input.read_string();
				ManagedGenericIRPConstDefs.StringOpt _arg2=ManagedGenericIRPConstDefs.StringOptHelper.read(_input);
				java.lang.String _arg3=_input.read_string();
				AlarmIRPConstDefs.BadAlarmInformationIdSeqHolder _arg4= new AlarmIRPConstDefs.BadAlarmInformationIdSeqHolder();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.SignalHelper.write(_out,comment_alarms(_arg0,_arg1,_arg2,_arg3,_arg4));
				AlarmIRPConstDefs.BadAlarmInformationIdSeqHelper.write(_out,_arg4.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(AlarmIRPSystem.CommentAlarms _ex2)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.CommentAlarmsHelper.write(_out, _ex2);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex3)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex3);
			}
				break;
			}
			case 2: // get_alarm_irp_versions
			{
			try
			{
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.VersionNumberSetHelper.write(_out,get_alarm_irp_versions());
			}
			catch(AlarmIRPSystem.GetAlarmIRPVersions _ex0)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.GetAlarmIRPVersionsHelper.write(_out, _ex0);
			}
				break;
			}
			case 3: // get_alarm_irp_notification_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_alarm_irp_notification_profile(_arg0));
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(AlarmIRPSystem.GetAlarmIRPNotificationProfile _ex2)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.GetAlarmIRPNotificationProfileHelper.write(_out, _ex2);
			}
				break;
			}
			case 4: // get_alarm_list
			{
			try
			{
				ManagedGenericIRPConstDefs.StringOpt _arg0=ManagedGenericIRPConstDefs.StringOptHelper.read(_input);
				AlarmIRPConstDefs.DNOpt _arg1=AlarmIRPConstDefs.DNOptHelper.read(_input);
				org.omg.CORBA.BooleanHolder _arg2= new org.omg.CORBA.BooleanHolder();
				AlarmIRPSystem.AlarmInformationIteratorHolder _arg3= new AlarmIRPSystem.AlarmInformationIteratorHolder();
				_out = handler.createReply();
				CosNotification.EventBatchHelper.write(_out,get_alarm_list(_arg0,_arg1,_arg2,_arg3));
				_out.write_boolean(_arg2.value);
				AlarmIRPSystem.AlarmInformationIteratorHelper.write(_out,_arg3.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(AlarmIRPSystem.GetAlarmList _ex1)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.GetAlarmListHelper.write(_out, _ex1);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex2)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex2);
			}
				break;
			}
			case 5: // clear_alarms
			{
			try
			{
				java.lang.String[] _arg0=AlarmIRPConstDefs.AlarmInformationIdSeqHelper.read(_input);
				java.lang.String _arg1=_input.read_string();
				ManagedGenericIRPConstDefs.StringOpt _arg2=ManagedGenericIRPConstDefs.StringOptHelper.read(_input);
				AlarmIRPConstDefs.BadAlarmInformationIdSeqHolder _arg3= new AlarmIRPConstDefs.BadAlarmInformationIdSeqHolder();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.SignalHelper.write(_out,clear_alarms(_arg0,_arg1,_arg2,_arg3));
				AlarmIRPConstDefs.BadAlarmInformationIdSeqHelper.write(_out,_arg3.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(AlarmIRPSystem.ClearAlarms _ex2)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.ClearAlarmsHelper.write(_out, _ex2);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex3)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex3);
			}
				break;
			}
			case 6: // get_alarm_count
			{
			try
			{
				ManagedGenericIRPConstDefs.StringOpt _arg0=ManagedGenericIRPConstDefs.StringOptHelper.read(_input);
				org.omg.CORBA.IntHolder _arg1= new org.omg.CORBA.IntHolder();
				org.omg.CORBA.IntHolder _arg2= new org.omg.CORBA.IntHolder();
				org.omg.CORBA.IntHolder _arg3= new org.omg.CORBA.IntHolder();
				org.omg.CORBA.IntHolder _arg4= new org.omg.CORBA.IntHolder();
				org.omg.CORBA.IntHolder _arg5= new org.omg.CORBA.IntHolder();
				org.omg.CORBA.IntHolder _arg6= new org.omg.CORBA.IntHolder();
				_out = handler.createReply();
				get_alarm_count(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
				_out.write_ulong(_arg1.value);
				_out.write_ulong(_arg2.value);
				_out.write_ulong(_arg3.value);
				_out.write_ulong(_arg4.value);
				_out.write_ulong(_arg5.value);
				_out.write_ulong(_arg6.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(AlarmIRPSystem.GetAlarmCount _ex2)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.GetAlarmCountHelper.write(_out, _ex2);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex3)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex3);
			}
				break;
			}
			case 7: // unacknowledge_alarms
			{
			try
			{
				java.lang.String[] _arg0=AlarmIRPConstDefs.AlarmInformationIdSeqHelper.read(_input);
				java.lang.String _arg1=_input.read_string();
				ManagedGenericIRPConstDefs.StringOpt _arg2=ManagedGenericIRPConstDefs.StringOptHelper.read(_input);
				AlarmIRPConstDefs.BadAlarmInformationIdSeqHolder _arg3= new AlarmIRPConstDefs.BadAlarmInformationIdSeqHolder();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.SignalHelper.write(_out,unacknowledge_alarms(_arg0,_arg1,_arg2,_arg3));
				AlarmIRPConstDefs.BadAlarmInformationIdSeqHelper.write(_out,_arg3.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(AlarmIRPSystem.UnacknowledgeAlarms _ex2)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.UnacknowledgeAlarmsHelper.write(_out, _ex2);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex3)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex3);
			}
				break;
			}
			case 8: // acknowledge_alarms
			{
			try
			{
				AlarmIRPConstDefs.AlarmInformationIdAndSev[] _arg0=AlarmIRPConstDefs.AlarmInformationIdAndSevSeqHelper.read(_input);
				java.lang.String _arg1=_input.read_string();
				ManagedGenericIRPConstDefs.StringOpt _arg2=ManagedGenericIRPConstDefs.StringOptHelper.read(_input);
				AlarmIRPConstDefs.BadAcknowledgeAlarmInfoSeqHolder _arg3= new AlarmIRPConstDefs.BadAcknowledgeAlarmInfoSeqHolder();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.SignalHelper.write(_out,acknowledge_alarms(_arg0,_arg1,_arg2,_arg3));
				AlarmIRPConstDefs.BadAcknowledgeAlarmInfoSeqHelper.write(_out,_arg3.value);
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.ParameterNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.ParameterNotSupportedHelper.write(_out, _ex1);
			}
			catch(AlarmIRPSystem.AcknowledgeAlarms _ex2)
			{
				_out = handler.createExceptionReply();
				AlarmIRPSystem.AcknowledgeAlarmsHelper.write(_out, _ex2);
			}
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
